package com.st.event.demo.strategy.handler;

import com.st.event.demo.enums.HandlerEnum;
import com.st.event.demo.source.EventAttribute;
import com.st.event.demo.strategy.StrategyHandler;

public class TestHandler implements StrategyHandler {

    @Override
    public Object execute(EventAttribute attribute, Object... params) throws Exception {
        System.out.println("执行代理逻辑.....");
        return null;
    }

    @Override
    public boolean apply(EventAttribute eventAttribute) {
        return eventAttribute.handler() == HandlerEnum.DEFAULT;
    }
}
